<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
   <title>专业事件合约分析与预测工具 | 合约分析专家</title>
  
  <!-- SEO Meta Tags -->
  <meta name="description" content="专业的加密货币合约分析预测工具，提供永续合约分析预测、事件合约分析预测、AI合约预测和AI信号服务，帮助您精准把握币圈行情走势">
  <meta name="keywords" content="比特币合约分析,以太坊价格预测,加密货币交易信号,AI量化交易,数字货币技术指标,合约分析预测,永续合约分析预测,事件合约分析预测,AI合约预测,AI信号,币圈行情预测,币圈行情分析,加密货币分析,数字货币预测">
  <meta name="author" content="币圈工具箱">
  
  <!-- Open Graph / Facebook Meta Tags -->
  <meta property="og:type" content="website">
  <meta property="og:url" content="https://bqbot.cn/"> 
  <meta property="og:title" content="专业事件合约分析与预测工具 | 合约分析专家">
  <meta property="og:description" content="专业的加密货币合约分析预测工具，提供永续合约分析预测、事件合约分析预测、AI合约预测和AI信号服务,比特币合约分析,以太坊价格预测,加密货币交易信号,AI量化交易,数字货币技术指标">
  <meta property="og:image" content="https://bqbot.cn/wp-content/uploads/2025/03/币圈工具箱正方形512.png"> 
  
  <!-- Twitter Meta Tags -->
  <meta name="twitter:card" content="summary_large_image">
  <meta name="twitter:title" content="专业事件合约分析与预测工具 | 合约分析专家">
  <meta name="twitter:description" content="专业的加密货币合约分析预测工具，提供永续合约分析预测、事件合约分析预测、AI合约预测和AI信号服务,比特币合约分析,以太坊价格预测,加密货币交易信号,AI量化交易,数字货币技术指标">
  <meta name="twitter:image" content="https://bqbot.cn/wp-content/uploads/2025/03/币圈工具箱正方形512.png"> 
  
  <!-- Favicon -->
  <link rel="icon" href="https://bqbot.cn/wp-content/uploads/2025/03/币圈工具箱正方形512.png"  type="image/png">
  <link rel="apple-touch-icon" href="https://bqbot.cn/wp-content/uploads/2025/03/币圈工具箱正方形512.png"> 


  <script src="tailwindcss.css"></script>   
  <!-- <script src="https://unpkg.com/lightweight-charts@4.2.3/dist/lightweight-charts.standalone.production.js"></script>    -->
    <script src="lightweight-charts4.2.3.js"></script>  
  <script src="Calculatejms.js"></script>  


   <!-- 结构化数据标记 (JSON-LD) -->
    <script type="application/ld+json">
        {
          "@context": "https://schema.org",
          "@type": "WebApplication",
          "name": "币圈工具箱",
          "url": "https://bqbot.cn",
          "logo": "https://bqbot.cn/wp-content/uploads/2025/03/币圈工具箱正方形512.png",
          "description": "专业的事件合约分析与预测工具，提供币圈合约走势分析服务",
          "applicationCategory": "FinancialApplication",
          "operatingSystem": "WebBrowser",
          "offers": {
            "@type": "Offer",
            "price": "0",
            "priceCurrency": "USD"
          },
          "publisher": {
            "@type": "Organization",
            "name": "币圈工具箱"
          }
        }
    </script>


  <style>

    /* 添加在您的<style>部分 */
@keyframes shimmer {
  0% { transform: translateX(-100%) rotate(-30deg); }
  100% { transform: translateX(100%) rotate(-30deg); }
}
 
button {
  position: relative;
  overflow: hidden;
}
 
button::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0) 45%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0) 55%
  );
  transform: rotate(-30deg);
  opacity: 0;
  transition: opacity 0.3s;
}
 
button:hover::after {
  animation: shimmer 1s forwards;
  opacity: 1;
}

    /* 添加到您的<style>部分 */
.bold {
  font-weight: bold;
}
.positive-light {
  color: #86efac;  /* 浅绿色 */
}
.negative-light {
  color: #fca5a5;  /* 浅红色 */
}
    body {
      background-color: #1a1a1a;
      color: white;
      font-family: 'Arial', sans-serif;
    }
    .data-row {
      display: flex;
      justify-content: space-between;
      font-size: 0.85rem;
      margin-bottom: 0.3rem;
    }
    .positive {
      color: #10b981;
    }
    .negative {
      color: #ef4444;
    }
    /* 新增按钮选中样式 */
    .time-btn {
      background-color: #374151;
      color: white;
      padding: 0.25rem 0.75rem;
      border-radius: 0.25rem;
      font-size: 0.875rem;
      transition: all 0.2s;
    }
    .time-btn:hover {
      background-color: #4b5563;
    }
    .time-btn.active  {
      background-color: #3b82f6;
      color: white;
    }


/* 交易历史容器样式 - 更紧凑 */
#trade-history {
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 0.2; /* 减小行高 */ 
  padding: 2px 4px; /* 减小内边距 */
}
 
/* 盈利/亏损颜色 */
.positive-light {
  color: #86efac; /* 浅绿色 */
  font-weight: bold;
}
.negative-light {
  color: #fca5a5; /* 浅红色 */
  font-weight: bold;
}


#trade-history div {
   
     margin: 0; /* 移除外边距 */
  padding: 1px 0; /* 减小内边距 */
  min-height: auto; /* 取消最小高度 */
  line-height: 1.3; /* 紧凑行高 */

}
#trade-history div:hover {
  background-color: rgba(255,255,255,0.05);
}


#trade-history::-webkit-scrollbar {
  width: 6px;
}
#trade-history::-webkit-scrollbar-thumb {
  background-color: #4b5563;
  border-radius: 3px;
}


/* 添加到您的<style>部分 */
button[onclick="resetTradingSystem()"] {
  transition: all 0.3s;
  border: 1px solid rgba(255,255,255,0.1);
}
 
button[onclick="resetTradingSystem()"]:hover {
  background-color: #4b5563 !important;
  transform: translateY(-1px);
} 


  /* 覆盖原生confirm对话框样式 - Tailwind风格 */
  dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
  }
  
  dialog {
    background-color: #1f2937; /* bg-gray-800 */
    border: 1px solid #374151; /* border-gray-700 */
    border-radius: 0.5rem; /* rounded-lg */
    padding: 1.5rem; /* p-6 */
    color: white;
    max-width: 32rem; /* max-w-md */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  }
  
  dialog button {
    background-color: #3b82f6; /* bg-blue-500 */
    color: white;
    border: none;
    padding: 0.5rem 1rem; /* py-2 px-4 */
    border-radius: 0.25rem; /* rounded */
    margin: 0 0.5rem; /* mx-2 */
    cursor: pointer;
  }
  
  dialog button:hover {
    background-color: #2563eb; /* bg-blue-600 */
  }
  
  dialog button:focus {
    outline: none;
    box-shadow: 0 0 0 2px #93c5fd; /* focus:ring-2 ring-blue-300 */
  }


  /* 对话框动画 */
#confirm-modal {
  transition: opacity 0.2s ease;
}
 
#confirm-modal.modal-show  {
  opacity: 1;
  pointer-events: all;
}
 
/* 按钮悬停效果 */
#confirm-cancel:hover {
  background-color: #4b5563 !important;
}
 
#confirm-ok:hover {
  background-color: #2563eb !important;
}


/* 响应式导航栏样式 */
.crypto-header {
  padding: 0.5rem 0;
}
 
.header-link {
  font-size: 1rem; /* 默认字体大小 */
  flex-wrap: wrap; /* 允许换行 */
  justify-content: flex-start; /* 左对齐 */
  padding: 0.5rem 1rem;
}
 
.header-link span {
  margin: 0 0.3rem; /* 减少间距 */
  white-space: nowrap; /* 防止单个词换行 */
}
 
.header-link .chart-icon {
  font-size: 1.2rem;
  margin-right: 0.3rem;
}
 
.header-link .separator {
  display: none; /* 移动端隐藏分隔线 */
}
 
/* 移动端适配 */
@media (max-width: 640px) {
  .header-link {
    font-size: 0.9rem; /* 更小的字体 */
  }
  
  .header-link span:nth-child(2) {
    display: none; /* 隐藏"加密社"文字 */
  }
  
  .header-link .chart-icon {
    margin-right: 0;
  }
}
 
/* 中等屏幕适配 */
@media (min-width: 641px) and (max-width: 768px) {
  .header-link {
    font-size: 1.1rem;
  }
}

/* 新增顶部标题样式 */
    .crypto-header {
      
      background: linear-gradient(135deg, #040f03 0%, #223f26 100%);
      border-bottom: 1px solid rgba(255,255,255,0.1);
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
      position: relative;
      overflow: hidden;
    }
    
    .crypto-header::before {
      content: "";
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: linear-gradient(
        to bottom right,
        rgba(59, 130, 246, 0.1) 0%,
        rgba(99, 102, 241, 0.1) 50%,
        rgba(59, 130, 246, 0.1) 100%
      );
      animation: shimmer 3s infinite linear;
      z-index: 0;
    }
    
    .header-link {
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1rem 0;
      font-size: 1.5rem;
      font-weight: 700;
      color: white;
      text-decoration: none;
      position: relative;
      z-index: 1;
      transition: all 0.3s ease;
    }
    
    .header-link:hover {
      color: #93c5fd;
      transform: translateY(-1px);
    }
    
    .header-link span {
      margin: 0 0.5rem;
    }
    
    .header-link .chart-icon {
      font-size: 1.8rem;
      margin-right: 0.5rem;
      animation: pulse 2s infinite;
    }
    
    .header-link .separator {
      color: rgba(255,255,255,0.3);
      font-weight: 300;
    }
    
    @keyframes pulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.1); }
      100% { transform: scale(1); }
    }
    
    @keyframes shimmer {
      0% { transform: translateX(-50%) rotate(-30deg); }
      100% { transform: translateX(50%) rotate(-30deg); }
    }




    /* 授权遮罩层样式 */
.auth-blur {
    backdrop-filter: blur(2px);
}
 
/* 授权框动画 */
.transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}
 
/* 输入框样式 */
.border-gray-300 {
    border-color: #d1d5db;
}
 
.focus\:ring-blue-500:focus {
    --tw-ring-opacity: 1;
    --tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity));
}
 
.focus\:border-blue-500:focus {
    border-color: #3b82f6;
}
 
/* 按钮样式 */
.bg-blue-600 {
    background-color: #2563eb;
}
 
.hover\:bg-blue-700:hover {
    background-color: #1d4ed8;
}
 
/* 错误消息样式 */
.text-red-500 {
    color: #ef4444;
}




/* 添加到您的<style>部分 */
#auth-code {
  color: #1a1a1a; /* 深灰色文字 */
  background-color: #ffffff; /* 白色背景 */
}
 
/* 当输入框获得焦点时的样式 */
#auth-code:focus {
  color: #1a1a1a; /* 保持深色文字 */
}




/* 认证按钮样式 */
#auth-buttons, #user-info {
  transition: all 0.3s ease;
}
 
/* 模态框动画 */
#login-modal, #register-modal {
  transition: opacity 0.2s ease;
}
 
#login-modal.modal-show,  #register-modal.modal-show  {
  opacity: 1;
  pointer-events: all;
}
 
/* 输入框样式 */
input[type="text"], 
input[type="password"], 
input[type="email"] {
  background-color: #2d3748;
  border: 1px solid #4a5568;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  transition: all 0.2s;
}
 
input[type="text"]:focus, 
input[type="password"]:focus, 
input[type="email"]:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.3);
}
 
/* 复选框样式 */
input[type="checkbox"] {
  appearance: none;
  width: 1rem;
  height: 1rem;
  border: 1px solid #4a5568;
  border-radius: 0.25rem;
  background-color: #2d3748;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}
 
input[type="checkbox"]:checked {
  background-color: #4299e1;
  border-color: #4299e1;
}
 
input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  color: white;
  font-size: 0.75rem;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}













  </style>
</head>
<body class="bg-gray-900 text-white">

  <div class="fixed top-0 right-0 p-4 z-50">
  <div id="auth-buttons" class="flex items-center space-x-2">
    <button id="login-btn" class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md text-sm">登录</button>
    <button id="register-btn" class="bg-gray-700 hover:bg-gray-600 text-white px-4 py-2 rounded-md text-sm">注册</button>
  </div>
  <div id="user-info" class="hidden flex items-center space-x-2">
    <span id="username-display" class="text-white text-sm"></span>
    <button id="logout-btn" class="bg-red-600 hover:bg-red-700 text-white px-4 py-2 rounded-md text-sm">退出</button>
  </div>
</div>

<!-- 每日领取按钮 -->
<div class="fixed top-0 left-0 p-4 z-50">
  <button id="claim-btn" 
          class="bg-gradient-to-r from-green-500 to-blue-500 hover:from-green-600 hover:to-blue-600 text-white px-4 py-2 rounded-md text-sm font-bold shadow-lg transform hover:scale-105 transition-all duration-300 flex items-center">
    <svg xmlns="http://www.w3.org/2000/svg"  class="h-5 w-5 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">
      <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" />
    </svg>
    每日免费领取分析次数
  </button>
  <div id="claim-message" class="hidden mt-2 text-xs text-green-400"></div>
</div>

    <div class="crypto-header">
    <a href="https://bqbot.cn"  class="header-link" target="_blank">
      <span class="chart-icon">📈</span>
      <span>加密社</span>
      <span class="separator">|</span>
      <span>事件合约分析工具</span>
      <span class="separator">|</span>
      <span>合约分析</span>
    </a>
  </div>


<!-- 信号 -->
<!-- <div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-3 mb-6">
  <div class="rounded-lg bg-gray-800 border border-gray-700 shadow-sm hover:shadow-md transition-all duration-200 hover:border-blue-500/50">
    <div class="p-2 border-b border-gray-700 flex items-center justify-between">
      <div class="flex items-center space-x-2">
        <img alt="BNB" loading="lazy" width="24" height="24" src="https://cdn.jsdelivr.net/gh/vadimmalykhin/binance-icons/crypto/bnb.svg"  
             class="w-5 h-5 filter brightness-125">
        <span class="text-sm font-medium text-white truncate">BNB/USDT</span>
      </div>
      <span class="text-xs px-1.5 py-0.5 rounded bg-green-900/30 text-green-400">多</span>
    </div>
    
    <div class="p-2 space-y-2">
      <div class="flex justify-between items-center text-[0.7rem] text-gray-400">
        <span>信号时间</span>
        <span>35m前</span>
      </div>
      
      <div class="grid grid-cols-2 gap-1.5">
        <div class="bg-gray-700/40 p-1.5 rounded text-center">
          <p class="text-xs font-medium text-blue-400">798.93</p>
          <p class="text-[0.6rem] text-gray-400">入场</p>
        </div>
        <div class="bg-gray-700/40 p-1.5 rounded text-center">
          <p class="text-xs font-medium text-green-400">802.92</p>
          <p class="text-[0.6rem] text-gray-400">止盈</p>
        </div>
        <div class="bg-gray-700/40 p-1.5 rounded text-center">
          <p class="text-xs font-medium text-red-400">794.94</p>
          <p class="text-[0.6rem] text-gray-400">止损</p>
        </div>
        <div class="bg-gray-700/40 p-1.5 rounded text-center">
          <p class="text-xs font-medium text-purple-400">+0.5%</p>
          <p class="text-[0.6rem] text-gray-400">利润</p>
        </div>
      </div>
      
      <div class="flex space-x-1">
        <button class="flex-1 bg-blue-600/80 hover:bg-blue-600 text-white text-xs px-1 py-1 rounded flex items-center justify-center">
          <span class="truncate">跟单</span>
        </button>
        <button class="flex-1 bg-gray-700 hover:bg-gray-600 text-white text-xs px-1 py-1 rounded flex items-center justify-center">
          <span class="truncate">详情</span>
        </button>
      </div>
    </div>
  </div>
</div> -->


  <div class="container mx-auto px-4 py-8">
 
<!-- K线图区域 -->
<div class="bg-gray-800 rounded-lg shadow-lg p-4 mb-8">
  <div class="flex items-start mb-2">
    <div class="mr-4">
      <!-- 修改为下拉框 -->
      <select id="coin-selector" onchange="changeSymbol(this.value)"  class="bg-gray-700 text-white px-3 py-1 rounded text-lg font-semibold">
        <option value="ETHUSDT">ETH/USDT</option>
        <option value="BTCUSDT">BTC/USDT</option>
      </select>
      <p id="current-price" class="text-white text-lg font-bold mt-1 ml-2">$3,750.25</p>
      <p id="price-change" class="text-sm text-green-500 ml-2">+2.45%</p>
    </div>
  </div>
  <div id="chart" style="width: 100%; height: 400px;"></div>
</div>
 
    <!-- 周期按钮组 -->
    <div class="mb-8 flex gap-4 justify-center">
      <button id="btn-1m" onclick="changeInterval('1m')" class="time-btn">1m</button>
      <button id="btn-15m" onclick="changeInterval('15m')" class="time-btn active">15m</button>
      <button id="btn-30m" onclick="changeInterval('30m')" class="time-btn">30m</button>
      <button id="btn-1h" onclick="changeInterval('1h')" class="time-btn">1h</button>
      <button id="btn-4h" onclick="changeInterval('4h')" class="time-btn">4h</button>
    </div>

  
 
    <!-- 卡片区域 -->
    <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-8">
      <!-- 实时指标数据卡片 -->
      <div class="bg-gray-800 rounded-lg shadow-lg p-4 flex flex-col h-[30rem]">
        <h2 class="text-xl font-bold mb-2">实时指标数据</h2>
        <div id="real-time-content" class="flex-1 overflow-y-auto">
          <div class="data-row">
            <span>当前价格：</span>
            <span class="positive">$3,750.25</span>
          </div>
          <div class="data-row">
            <span>24H 涨跌：</span>
            <span class="positive">+2.45%</span>
          </div>
          <div class="data-row">
            <span>资金费率：</span>
            <span class="positive">0.01%</span>
          </div>
          <div class="data-row">
            <span>大户账户多空比：</span>
            <span>0</span>
          </div>
          <div class="data-row">
            <span>全局多空比：</span>
            <span>0</span>
          </div>
          <div class="data-row">
            <span>大户持仓多空比：</span>
            <span>0</span>
          </div>
          <div class="data-row">
            <span>主动买卖比：</span>
            <span>0</span>
          </div>
          <div class="data-row">
            <span>24H 成交量：</span>
            <span>0</span>
          </div>
          <div class="data-row">
            <span>24H 成交额：</span>
            <span>0</span>
          </div>
        </div>
        <button onclick="updateRealTimeData()" class="mt-2 bg-blue-500 hover:bg-blue-600 text-white py-1 px-3 rounded text-sm">
          更新数据 
        </button>
      </div>
 
      <!-- 技术指标数据卡片 -->
      <div class="bg-gray-800 rounded-lg shadow-lg p-4 flex flex-col h-[30rem]">
        <h2 class="text-xl font-bold mb-2">技术指标数据</h2>
        <div id="technical-content" class="flex-1 overflow-y-auto">
          <div class="data-row">
            <span>MA5(5日均线)：</span>
            <span>$0 ↗</span>
          </div>
          <div class="data-row">
            <span>MA10(10日均线)：</span>
            <span>$0 ↗</span>
          </div>
          <div class="data-row">
            <span>MA30(30日均线)：</span>
            <span>$0 ↗</span>
          </div>
          <div class="data-row">
            <span>RSI(14)：</span>
            <span>0 (中性)</span>
          </div>
          <div class="data-row">
            <span>MACD(12,26,9)：</span>
            <span class="positive">0 ↗</span>
          </div>
          <div class="data-row">
            <span>KDJ(9,3,3)：</span>
            <span>K:0 D:0 J:0</span>
          </div>
          <div class="data-row">
            <span>布林带上轨：</span>
            <span>$0</span>
          </div>
          <div class="data-row">
            <span>布林带中轨：</span>
            <span>$0</span>
          </div>
          <div class="data-row">
            <span>布林带下轨：</span>
            <span>$0</span>
          </div>
          <div class="data-row">
            <span>支撑位1：</span>
            <span>$0</span>
          </div>
          <div class="data-row">
            <span>阻力位1：</span>
            <span>$0</span>
          </div>
        </div>
        <button onclick="updateTechnicalData()" class="mt-2 bg-blue-500 hover:bg-blue-600 text-white py-1 px-3 rounded text-sm">
          更新数据 
        </button>
      </div>
 
      <!-- BTC 分析卡片 -->
      <div id="btc-card" class="bg-gray-800 rounded-lg shadow-lg p-4 flex flex-col h-[30rem]">
        <h2 class="text-xl font-bold mb-2">BTC 行情分析</h2>
        <div class="flex-1 overflow-y-auto">
          <p>趋势：震荡</p>
          <p>支撑位：$0</p>
          <p>阻力位：$0</p>
          <p class="mt-4">建议：观望</p>
        </div>
  
      </div>
 
      <!-- ETH 分析卡片 -->
      <div id="eth-card" class="bg-gray-800 rounded-lg shadow-lg p-4 flex flex-col h-[30rem]">
        <h2 class="text-xl font-bold mb-2">ETH 行情分析</h2>
        <div class="flex-1 overflow-y-auto">
          <p>趋势：震荡</p>
          <p>支撑位：$0</p>
          <p>阻力位：$0</p>
          <p class="mt-4">建议：观望</p>
        </div>
       
      </div>
    </div>



    <!-- 分析周期选择器和开始分析按钮组合 -->
<div class="flex flex-col items-center my-6 gap-4"> <!-- 垂直居中，添加间距 -->
  <!-- 分析周期下拉框 --> 
  <div class="w-full max-w-2xl"> <!-- 与开始分析按钮同宽 -->
    <label for="analysis-period" class="block text-sm font-medium mb-1 text-gray-300 ml-1">分析周期：</label>
    <select id="analysis-period" 
            class="w-full bg-gray-700 text-white p-3 rounded-lg text-sm border border-gray-600 hover:border-gray-500 focus:border-blue-500 focus:ring-1 focus:ring-blue-500 transition-colors">
      <option value="10m">10分钟</option>
      <option value="30m">30分钟</option>
      <option value="1h">1小时</option>
      <option value="4h">4小时</option>
    </select>
  </div>
  
  <!-- 开始分析按钮 -->
  <button onclick="window.startAnalysis()" 
          class="w-full max-w-2xl bg-gradient-to-r from-purple-600 via-indigo-600 to-blue-600 text-white font-bold py-4 px-8 rounded-lg text-lg relative overflow-hidden group transition-all duration-300 shadow-lg hover:shadow-xl">
    <span class="relative z-10">开始分析</span>
    <span class="absolute inset-0 bg-white opacity-0 group-hover:opacity-20 transition-opacity duration-300 transform -translate-x-full group-hover:translate-x-0"></span>
  </button>
</div>




    <!-- 模拟交易区域 -->
    <div class="bg-gray-800 rounded-lg shadow-lg p-6">
      <h2 class="text-xl font-bold mb-4">模拟交易系统</h2>
 
      <div class="grid grid-cols-1 sm:grid-cols-3 gap-4 mb-4">
        <div>
          <label class="block mb-1 text-sm">本金（USDT）：</label>
          <input type="number" id="capital" value="5.00" class="w-full bg-gray-700 text-white p-2 rounded text-sm">
        </div>
        <div>
          <label class="block mb-1 text-sm">交易品种：</span>
          <select id="tradeType" onchange="changeSymbol(this.value)"    class="w-full bg-gray-700 text-white p-2 rounded text-sm">
            <option value="BTCUSDT">BTCUSDT</option>
            <option value="ETHUSDT" selected>ETHUSDT</option>
          </select>
        </div>
        <div>
          <label class="block mb-1 text-sm">持仓时间：</span>
          <select id="holdTime" class="w-full bg-gray-700 text-white p-2 rounded text-sm">
            <option>10分钟</option>
            <option>30分钟</option>
            <option>1小时</option>
            <option>4小时</option>
          </select>
        </div>
      </div>
 
      <div class="flex gap-2 mb-4">
        <button onclick="buyUp()" class="flex-1 bg-green-500 hover:bg-green-600 text-white py-2 rounded text-sm">
          买入看涨
        </button>
        <button onclick="buyDown()" class="flex-1 bg-red-500 hover:bg-red-600 text-white py-2 rounded text-sm">
          买入看跌
        </button>
      </div>

      <!-- 添加重置按钮 -->
<button onclick="resetTradingSystem()" 
        class="w-full mb-4 bg-gray-600 hover:bg-gray-700 text-white py-2 rounded text-sm flex items-center justify-center">
  <svg xmlns="http://www.w3.org/2000/svg"  class="h-4 w-4 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">
    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
  </svg>
  重置模拟系统
</button>
 
      <p id="positions-count" class="mb-2">当前持仓（0）</p>
      <textarea id="position" class="w-full h-16 bg-gray-700 text-white p-2 rounded text-sm mb-4" readonly>
无持仓 
      </textarea>
 
      <p class="mb-2">交易历史（最多20条）</p>
      <div id="trade-history" class="w-full h-32 bg-gray-700 text-white p-2 rounded text-sm mb-4 overflow-y-auto font-mono"></div>
 
<div class="flex justify-between items-center">
  <div id="simulated-trading-stats">
    <p id="total-trades">总交易：0</p>
    <p id="win-rate">胜率：0%</p>
    <p id="total-profit">总收益：0.00 USDT</p>
  </div>
</div>

 
      <!-- 自动刷新选项 -->
      <div class="mt-4 flex items-center">
        <input type="checkbox" id="auto-refresh" class="mr-2" checked />
        <label for="auto-refresh" class="text-sm">启用自动刷新（60秒）</label>
      </div>
 
    </div>
 
  </div>



  <!-- 添加到<body>末尾 -->
<div id="confirm-modal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
  <div class="bg-gray-800 rounded-lg border border-gray-700 p-6 max-w-md w-full mx-4 shadow-xl">
    <h3 class="text-xl font-bold mb-3 text-white">确认重置</h3>
    <p class="text-gray-300 mb-2">确定要重置模拟交易系统吗？</p>
    <p class="text-red-400 mb-6">这将清空所有持仓和历史数据！</p>
    
    <div class="flex justify-end space-x-3">
      <button id="confirm-cancel" class="px-4 py-2 rounded bg-gray-600 hover:bg-gray-700 text-white transition">
        取消 
      </button>
      <button id="confirm-ok" class="px-4 py-2 rounded bg-blue-600 hover:bg-blue-700 text-white transition">
        确认重置
      </button>
    </div>
  </div>
</div>


<!-- 登录模态框 -->
<div id="login-modal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
  <div class="bg-gray-800 rounded-lg border border-gray-700 p-6 max-w-md w-full mx-4 shadow-xl">
    <h3 class="text-xl font-bold mb-4 text-white">用户登录</h3>
    <div class="mb-4">
      <label for="login-username" class="block text-sm font-medium text-gray-300 mb-1">用户名</label>
      <input type="text" id="login-username" class="w-full bg-gray-700 text-white p-2 rounded text-sm border border-gray-600 focus:border-blue-500 focus:ring-1 focus:ring-blue-500">
    </div>
    <div class="mb-4">
      <label for="login-password" class="block text-sm font-medium text-gray-300 mb-1">密码</label>
      <input type="password" id="login-password" class="w-full bg-gray-700 text-white p-2 rounded text-sm border border-gray-600 focus:border-blue-500 focus:ring-1 focus:ring-blue-500">
    </div>
    <div class="flex items-center mb-4">
      <input type="checkbox" id="remember-me" class="mr-2">
      <label for="remember-me" class="text-sm text-gray-300">记住我</label>
    </div>
    <div class="flex justify-end space-x-3">
      <button id="login-cancel" class="px-4 py-2 rounded bg-gray-600 hover:bg-gray-700 text-white transition">取消</button>
      <button id="login-submit" class="px-4 py-2 rounded bg-blue-600 hover:bg-blue-700 text-white transition">登录</button>
    </div>
  </div>
</div>
 
<!-- 注册模态框 -->
<!-- 注册模态框 -->
<div id="register-modal" class="hidden fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">
  <div class="bg-gray-800 rounded-lg border border-gray-700 p-6 max-w-md w-full mx-4 shadow-xl">
    <h3 class="text-xl font-bold mb-4 text-white">用户注册</h3>
    <div class="mb-4">
      <label for="register-username" class="block text-sm font-medium text-gray-300 mb-1">用户名</label>
      <input type="text" id="register-username" class="w-full bg-gray-700 text-white p-2 rounded text-sm border border-gray-600 focus:border-blue-500 focus:ring-1 focus:ring-blue-500">
    </div>
    <div class="mb-4">
      <label for="register-email" class="block text-sm font-medium text-gray-300 mb-1">邮箱</label>
      <div class="flex gap-2">
        <input type="email" id="register-email" class="flex-1 bg-gray-700 text-white p-2 rounded text-sm border border-gray-600 focus:border-blue-500 focus:ring-1 focus:ring-blue-500">
        <button id="send-code-btn" onclick="AuthModule.sendVerificationCode(document.getElementById('register-email').value)"  
                class="bg-blue-600 hover:bg-blue-700 text-white px-3 py-2 rounded text-sm whitespace-nowrap">
          获取验证码 
        </button>
      </div>
    </div>
    <div class="mb-4">
      <label for="verification-code" class="block text-sm font-medium text-gray-300 mb-1">验证码</label>
      <input type="text" id="verification-code" class="w-full bg-gray-700 text-white p-2 rounded text-sm border border-gray-600 focus:border-blue-500 focus:ring-1 focus:ring-blue-500">
    </div>
    <div class="mb-4">
      <label for="register-password" class="block text-sm font-medium text-gray-300 mb-1">密码</label>
      <input type="password" id="register-password" class="w-full bg-gray-700 text-white p-2 rounded text-sm border border-gray-600 focus:border-blue-500 focus:ring-1 focus:ring-blue-500">
    </div>
    <div class="mb-4">
      <label for="register-confirm-password" class="block text-sm font-medium text-gray-300 mb-1">确认密码</label>
      <input type="password" id="register-confirm-password" class="w-full bg-gray-700 text-white p-2 rounded text-sm border border-gray-600 focus:border-blue-500 focus:ring-1 focus:ring-blue-500">
    </div>
    <div class="flex justify-end space-x-3">
      <button id="register-cancel" class="px-4 py-2 rounded bg-gray-600 hover:bg-gray-700 text-white transition">取消</button>
      <button id="register-submit" class="px-4 py-2 rounded bg-blue-600 hover:bg-blue-700 text-white transition">注册</button>
    </div>
  </div>
</div>




<!-- 授权验证浮动窗口 - 大尺寸居中 -->
<div id="auth-window" class="hidden fixed inset-0 flex items-center justify-center z-50">
  <!-- 半透明背景层 -->
  <div class="absolute inset-0 bg-black bg-opacity-50" onclick="document.getElementById('auth-window').classList.add('hidden')"></div> 
  
  <!-- 主窗口容器 -->
  <div class="relative bg-gray-800 rounded-lg border border-gray-700 shadow-2xl w-full max-w-2xl mx-4">
    <!-- 窗口标题栏 -->
    <div class="flex justify-between items-center p-4 border-b border-gray-700 bg-gray-900 rounded-t-lg">
      <h3 class="text-xl font-bold text-blue-400">授权验证</h3>
      <button onclick="document.getElementById('auth-window').classList.add('hidden')"  
              class="text-gray-400 hover:text-white">
        <svg xmlns="http://www.w3.org/2000/svg"  class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
          <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
        </svg>
      </button>
    </div>
    
    <!-- 窗口内容 -->
    <div class="p-6">
      <div class="grid md:grid-cols-2 gap-6">
        <!-- 左侧文本内容 -->
       
        <div>
         
             <p class="text-base text-gray-300 mb-4">
               <a href="http://bqbot.cn" target="_blank" style="color: #fca5a5;">访问官网</a>
          </p>
          <!-- 副标题1 -->
          <p class="text-base text-gray-300 mb-4">
            
            请添加管理员微信购买后获取授权码以继续使用本系统
          </p>
          
          <!-- 副标题2 -->
          <p class="text-base text-yellow-400 mb-4">
            胜率60-75%，支持模拟下单
          </p>

                <!-- 副标题2 -->
          <p class="text-base text-yellow-400 mb-4">
            149人民币，分析次数每月新增1000+
          </p>
         
          
          <!-- 副标题3 - 预留区域 -->
          <div id="auth-links" class="flex space-x-6 mb-6">
            <a href="https://bqbot.cn/%e4%ba%8b%e4%bb%b6%e5%90%88%e7%ba%a6%e5%88%86%e6%9e%90%e6%b0%b8%e7%bb%ad%e5%90%88%e7%ba%a6%e5%88%86%e6%9e%90%e5%b7%a5%e5%85%b7%e7%94%a8%e6%88%b7%e6%b5%8b%e8%af%84%e5%8f%8d%e9%a6%88/" target="_blank" class="text-blue-400 hover:text-blue-300 text-base">查看用户反馈</a>
            <a href="https://bqbot.cn/favorites/%e5%b8%81%e5%9c%88%e5%b0%8f%e5%b7%a5%e5%85%b7/" target="_blank" class="text-blue-400 hover:text-blue-300 text-base">其他产品介绍</a>
          </div>
          
          <!-- 微信号 -->
          <div class="mb-6">
            <p class="text-sm text-gray-400 mb-1">管理员微信号:</p>
            <p class="text-xl font-mono bg-gray-700 px-4 py-2 rounded inline-block">Goodbye_cq</p>
          </div>
          
          <!-- 授权码输入框 -->
          <div class="mb-4">
            <label for="auth-code" class="block text-base text-gray-300 mb-2">请输入授权码</label>
            <input type="text" id="auth-code" 
                   class="w-full bg-gray-700 text-white px-4 py-3 rounded text-base border border-gray-600 focus:border-blue-500 focus:ring-2 focus:ring-blue-500">
          </div>
          
          <!-- 验证按钮 -->
          <button onclick="verifyAuthCode()" 
                  class="w-full bg-blue-600 hover:bg-blue-700 text-white py-3 rounded text-base font-medium transition-colors">
            验证授权 
          </button>
        </div>
        
        <!-- 右侧二维码 -->
        <div class="flex flex-col items-center justify-center">
          <p class="text-base text-gray-300 mb-4">扫描二维码添加微信</p>
          <img src="https://bqbot.cn/wp-content/themes/onenav/images/wechat_qrcode.png"  
               alt="微信二维码" 
               class="w-48 h-48 border-2 border-gray-600 rounded-lg mb-4">
          <p class="text-sm text-gray-400 text-center">添加时请备注"授权码购买"</p>
        </div>
      </div>
    </div>
  </div>
</div>

 
